package com.chen.mall.modules.ums.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;

import java.io.Serializable;

/**
 * <p>
 * 后台用户和角色关系表
 * </p>
 *
 * @author macro
 * @since 2020-08-21
 */
@TableName("ums_admin_role_relation")
@ApiModel(value="UmsAdminRoleRelation对象", description="后台用户和角色关系表")
public class UmsAdminRoleRelation implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long adminId;

    private Long roleId;

    public UmsAdminRoleRelation() {
    }


    public Long getId() {
        return this.id;
    }

    public Long getAdminId() {
        return this.adminId;
    }

    public Long getRoleId() {
        return this.roleId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setAdminId(Long adminId) {
        this.adminId = adminId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String toString() {
        return "UmsAdminRoleRelation(id=" + this.getId() + ", adminId=" + this.getAdminId() + ", roleId=" + this.getRoleId() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof UmsAdminRoleRelation)) return false;
        final UmsAdminRoleRelation other = (UmsAdminRoleRelation) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$adminId = this.getAdminId();
        final Object other$adminId = other.getAdminId();
        if (this$adminId == null ? other$adminId != null : !this$adminId.equals(other$adminId)) return false;
        final Object this$roleId = this.getRoleId();
        final Object other$roleId = other.getRoleId();
        if (this$roleId == null ? other$roleId != null : !this$roleId.equals(other$roleId)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UmsAdminRoleRelation;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $adminId = this.getAdminId();
        result = result * PRIME + ($adminId == null ? 43 : $adminId.hashCode());
        final Object $roleId = this.getRoleId();
        result = result * PRIME + ($roleId == null ? 43 : $roleId.hashCode());
        return result;
    }
}
